clear,clc

fileDIR = '/mri_projects/ASD_Analysis/Results/Variability';

GU_ASD_Var = load([fileDIR '/intra_Variability_FS4_ASD_GU.mat']);
GU_HC_Var = load([fileDIR '/intra_Variability_FS4_HC_GU.mat']);

KKI_ASD_Var = load([fileDIR '/intra_Variability_FS4_ASD_KKI.mat']);
KKI_HC_Var = load([fileDIR '/intra_Variability_FS4_HC_KKI.mat']);

[asd_lh_r, asd_lh_p] = corr(GU_ASD_Var.lh, KKI_ASD_Var.lh);
[asd_rh_r, asd_rh_p] = corr(GU_ASD_Var.rh, KKI_ASD_Var.rh);

fprintf(['GU ~ KKI ASD lh : r: ' num2str(asd_lh_r) ' p: ' num2str(asd_lh_p) '\n']);
fprintf(['GU ~ KKI ASD rh : r: ' num2str(asd_rh_r) ' p: ' num2str(asd_rh_p) '\n']);

[hc_lh_r, hc_lh_p] = corr(GU_HC_Var.lh, KKI_HC_Var.lh);
[hc_rh_r, hc_rh_p] = corr(GU_HC_Var.rh, KKI_HC_Var.rh);

fprintf(['GU ~ KKI HC lh : r: ' num2str(hc_lh_r) ' p: ' num2str(hc_lh_p) '\n']);
fprintf(['GU ~ KKI HC rh : r: ' num2str(hc_rh_r) ' p: ' num2str(hc_rh_p) '\n']);

GU_ASD_Var_whole = [GU_ASD_Var.lh; GU_ASD_Var.rh];
GU_HC_Var_whole = [GU_HC_Var.lh; GU_HC_Var.rh];

KKI_ASD_Var_whole = [KKI_ASD_Var.lh; KKI_ASD_Var.rh];
KKI_HC_Var_whole = [KKI_HC_Var.lh; KKI_HC_Var.rh];

[asd_wh_r, asd_wh_p] = corr(GU_ASD_Var_whole, KKI_ASD_Var_whole);
[hc_wh_r, hc_wh_p] = corr(GU_HC_Var_whole, KKI_HC_Var_whole);

fprintf(['GU ~ KKI ASD wh : r: ' num2str(asd_wh_r) ' p: ' num2str(asd_wh_p) '\n']);
fprintf(['GU ~ KKI HC wh : r: ' num2str(hc_wh_r) ' p: ' num2str(hc_wh_p) '\n']);